package tenth.泛型应用;
class Notepad<K,V>{
    private K key;
    private V value;

    public K getKey() {
        return key;
    }

    public void setKey(K key) {
        this.key = key;
    }

    public V getValue() {
        return value;
    }

    public void setValue(V value) {
        this.value = value;
    }
}
public class 指定多个泛型类型 {
    public static void main(String[] args) {
        Notepad<String,Integer> notepad = new Notepad<>();
        notepad.setKey("王境泽");
        notepad.setValue(18);
        System.out.println("姓名："+notepad.getKey()+",年龄："+notepad.getValue());
    }
}
/*
D:\WorkSpaces\Java\jdk-21\bin\java.exe "-javaagent:D:\Software\IntelliJ IDEA\IntelliJ IDEA 2023.3.2\lib\idea_rt.jar=53828:D:\Software\IntelliJ IDEA\IntelliJ IDEA 2023.3.2\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath D:\WorkSpaces\JavaDevelopBase_start_329\out\production\JavaDevelopBase_start_329 tenth.泛型应用.指定多个泛型类型
姓名：王境泽,年龄：18

Process finished with exit code 0

 */